<template>
	<view class="container" @tap="togglePicker(0),bottomHeight=0">
		<!-- #ifdef MP-WEIXIN -->
		<view class="custom_box">
			<image class="indexbg2"
				src="https://images.fudiemall.com/storage/default/20250418/mpweixin899c2039b1f111d4129b6abed2234632d260545c.png"
				mode="aspectFill"></image>
			<view :style="{height: statusBarHeight + 'px', backgroundColor: backgroundColor }"></view>
			<view class="custom_nav " :style="{height: titleHeight + 'px', backgroundColor: backgroundColor}">
				<image class="goback"
					src="https://images.fudiemall.com/storage/default/20250411/left1a09bc837d836f79ae700b66670bc2b280f7c972.png"
					mode="aspectFill" @click="leftClick"></image>
				<view class="f28 c3" @tap.stop="right()">{{tit}}</view>
			</view>
		</view>
		<view :style="{height: statusBarHeight + titleHeight + 'px'}" style="width: 100%;"></view>
		<!-- #endif -->
		<!-- #ifdef H5 -->
		<view class="">
			<u-navbar :title="tit" :fixed="true" :placeholder="true" :safeAreaInsetTop="true" :autoBack="false"
				leftIconColor="#333" titleStyle="color:#333" bgColor="#transparent" @leftClick="leftClick">
			</u-navbar>
			<image class="indexbg"
				src="https://images.fudiemall.com/storage/default/20250411/BG77ff634c5c493fbb0cb752c7b44d86c703900c11.png"
				mode="aspectFill"></image>
		</view>
		<!-- #endif -->
		<!--内容-->
		<view class="scroll" :style="{height: scrollHeight}">
			<scroll-view :scroll-into-view="scrollViewId" style="height: 100%;" scroll-y class="sssc"
				:scroll-with-animation="true" :scroll-top="scrtop" :refresher-enabled="open"
				@refresherrefresh="getmsglist(1)">
				<view class="item-space"></view>
				<view v-for="(item, index) in list" :key="index" style="position: relative;margin: 0 30rpx 30rpx;">
					<!-- <view class="time" v-if="showReminder">{{$u.timeFrom(item.time,'hh:MM:ss')}}</view> -->
					<view class="time" v-if="showReminder">{{item.time | date('mm-dd hh:MM:ss')}}</view>
					<!-- {{item.time | timeFrom('yy:mm:dd hh:MM:ss')}} -->
					<!--撤销-->
					<!-- 	<view v-if="ischehui&&selid==item.id" class="cancel">
						<text v-if="item.source == userId" class="text">你撤回了一条消息</text>
						<text v-else class="text">成员 {{ item.telephone }} 撤回了一条消息</text>
					</view> -->
					<view class="Toolswrap" v-if="selid==item.id&&showtools">
						<view class="Toolsitem" @click="copymes(item)" v-if="selitem.msgType=='txt'">
							<image :src="baseUrl+'/static/img/fuzhi.png'" mode="aspectFill"></image>
							<text>复制</text>
						</view>
						<view class="Toolsitem" @click="goforwarding(item)">
							<image :src="baseUrl+'/static/img/zhuanfa.png'" mode="aspectFill"></image>
							<text>转发</text>
						</view>
						<view class="Toolsitem" v-if="item.source == userId" @click="clickchehui(item)">
							<image :src="baseUrl+'/static/img/chehui.png'" mode="aspectFill"></image>
							<text>撤回</text>
						</view>
						<view class="Toolsitem" @click="changeyinyong(item)">
							<image :src="baseUrl+'/static/img/yinyong.png'" mode="aspectFill"></image>
							<text>引用</text>
						</view>
					</view>
					<view class="item flex-row" :class="[item.source == userId ? 'right' : 'left']">

						<view style="display: flex;flex-direction: column;font-size: 22rpx;">
							<image mode="aspectFill" :src="item.head_img" class="face"
								:class="[item.source == userId ? 'nomar' : 'yesmar']"></image>
						</view>
						<!--文本-->
						<view class="wraps" :class="[item.source == userId ? 'yesss' : 'nosss']">
							<view class="nickname" v-if="item.source!=userId">
								{{item.nickname}}
							</view>
							<view v-if="item.msgType == 'txt'" @longtap.stop="tools(item)" class="content flex-row">
								{{item.content}}

							</view>
							<image v-if="item.msgType == 'img'" @tap.stop="preview(item.url)"
								@longtap.stop="tools(item)" :src="item.url" mode="widthFix" style="width: 320upx;">
							</image>
							<view style="position: relative;" @click.stop="govideo(item.url)   "
								@longtap.stop="tools(item)">

								<image :src="item.video_thumb" alt="" v-if="item.msgType == 'video'&&item.video_thumb"
									style="width: 320upx;" mode="widthFix"></image>
								<image :src="item.thumb" alt="" v-if="item.msgType == 'video'&&!item.video_thumb"
									style="width: 320upx;" mode="widthFix"></image>
								<image v-if="item.msgType == 'video'"
									style="position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);width: 90rpx;height: 90rpx;"
									src="https://images.fudiemall.com/storage/default/20250414/playd0a41f83a85ee07826b15c72efb511202aec84ed.png"
									mode=""></image>
							</view>
							<!-- <iframe    v-if="item.msgType == 'video'"   style="width: 320upx;position: relative;" :src="item.url" frameborder="0"></iframe> -->
							<!-- <nvideo style="width: 300rpx;height: 500rpx;" v-if="item.msgType == 'video'" :src="item.url"></nvideo> -->
							<!-- <video   v-if="item.msgType == 'video'"   :src="item.url" mode="widthFix" style="width: 320upx;position: relative;"></video> -->
							<view v-if="item.msgType == 'audio'" @tap.stop="playVoice(item)" class="content">
								<image v-show="voicePlayingId != item.url" :src="baseUrl+'/static/img/audio.png'"
									class="voice-icon">
								</image>
								<image v-show="voicePlayingId == item.url" :src="baseUrl+'/static/img/audio-play.gif'"
									class="voice-icon"></image>
							</view>

							<!--图片-->

							<!--地图-->
							<!-- 						<view v-if="item.msgType == 'map'" class="content map" @tap="openLocation(item.content)">
							<view class="title">{{ item.content.address }}</view>
							<map class="box" :latitude="item.content.latitude" :longitude="item.content.longitude"
								:markers="[{latitude: item.content.latitude, longitude: item.content.longitude, iconPath: '../../../static/img/marker.png'}]"
								@tap="openLocation(item.content)"></map>
						</view> -->
							<!--语音-->
							<view class="bbwrap "
								v-if="item.quote_msg !== null && item.quote_msg !== undefined && isNotEmptyObject(item.quote_msg)"
								@click.stop="getyinyongs(item.quote_msg)">
								{{item.quote_msg.nickname}}:
								<text
									v-if="item.quote_msg.msgType=='txt'">{{ item.quote_msg.content.length > 8 ? item.quote_msg.content.slice(0, 8) + '...' : item.quote_msg.content }}</text>
								<image style="width: 60rpx;height: 60rpx;" v-if="item.quote_msg.msgType=='img'"
									:src="item.quote_msg.url" mode=""></image>
								<image style="width: 60rpx;height: 60rpx;"
									v-if="item.quote_msg.msgType == 'video'&&item.quote_msg.video_thumb"
									:src="item.quote_msg.video_thumb" mode=""></image>

								<image style="width: 60rpx;height: 60rpx;"
									v-if="item.quote_msg.msgType == 'video'&&!item.quote_msg.video_thumb"
									:src="item.quote_msg.thumb" mode=""></image>
								<image v-if="item.quote_msg.msgType == 'video'"
									style="position: absolute;top: 50%;right:5%; transform: translate(-50%,-50%);width: 30rpx;height: 30rpx;"
									src="https://images.fudiemall.com/storage/default/20250414/playd0a41f83a85ee07826b15c72efb511202aec84ed.png"
									mode=""></image>
							</view>
							<view class="dianpuwrap"
								v-if="item.customEvent=='shop_seller_homepage'||item.customEvent=='local_seller_homepage'">
								<image :src="item.url" mode="aspectFill"></image>
								<view class="topdianpuwrap">
									<text>{{item.name}}</text>
									<u-rate style="margin-top: 18rpx;" readonly size="18" v-model="item.rate"
										active-color="#FFC300"></u-rate>
									<view class="btnsss" @click="gohomes(item)">
										去逛逛
									</view>
								</view>
							</view>
							<view class="shangpinwrap"
								v-if="item.customEvent=='shop_goods'||item.customEvent=='local_goods'">
								<image :src="item.url" mode="aspectFill"></image>
								<view class="topdianpuwrap">
									<text>{{item.name}}</text>
									<view class="c6 f26" style="margin-top: 10rpx;text-align: left;">
										库存：{{item.stock}}
									</view>
									<view class="price">
										￥{{item.price}}
									</view>
								</view>
								<view class="dwbtn" @click="gohomes(item)">
									立即抢购
								</view>
							</view>
							<view class="shangpinwrap1" v-if="item.customEvent=='shop_seller_goods'">
								<view class="shangpinbox flex_dq" @click="gohomes(item)">
									<image :src="item.push_exts.image" mode="aspectFill"></image>
									<view class="topdianpuwrap">
										<view class="shangpinName">{{item.push_exts.goods_name}}</view>
										<view class="price">
											￥{{item.push_exts.price}}
										</view>
									</view>
								</view>
								<view class="flex_r" v-if="item.source == userId" @click="gohomes(item)">
									<text class="dwbtn1">去下单</text>
								</view>
							</view>
							<!--  -->
							<view class="orderwrap" v-if="item.customEvent=='shop_order'">
								<view class="order_box flex_ZC">
									<view class="order_box_t flex_ld">

										<text class="order_title c3 fw7">您当前咨询的订单</text>
										<text class="f24 c1" v-if="item.push_exts.status==1">待支付</text>
										<text class="f24 c1" v-if="item.push_exts.status==2">待发货</text>
										<text class="f24 c1" v-if="item.push_exts.status==3">待收货</text>
										<text class="f24 c1" v-if="item.push_exts.status==4">待评价</text>
										<text class="f24 c1" v-if="item.push_exts.status==5">已完成</text>
										<text class="f24 c1" v-if="item.push_exts.status==6">已取消</text>
									</view>
									<view class="order_goods ">
										<view class="flex_dq ordergoods_box" v-for="(iten,ind) in item.push_exts.detail"
											:key="item.order_id" @click="gohomes(item)">
											<image class="order_icon" :src="iten.image" mode="aspectFill"></image>
											<view class="order_box_order flex_Z">
												<text class="f30 c3 orderName">{{iten.goods_name}}</text>
												<view class="specifications flex_dq">
													<text class="f30 c9">总价:￥{{iten.pay_price}}(共{{iten.num}}件)</text>
												</view>
											</view>
										</view>
									</view>
								</view>
							</view>
						</view>

					</view>
				</view>
				<view class="empty3">
					
				</view>
				<view id="bottom"></view>
			</scroll-view>
		</view>
		<!--输入-->
		<view class="oper flex-row" @tap.prevent.stop="showtools=false" :style="{bottom:bottomHeight + 'rpx'}">
			<!-- 语音按钮切换 -->
			<view class="flex_c" style="width: 730rpx;" :style="{ 'margin-top': marginTopValue }">
				<!-- #ifdef APP -->
				<image v-if="isEdit" @tap="toggleEdit(false)" style="margin-right: 20rpx;"
					:src="baseUrl+'/static/img/voice-circle.png'" class="icon" mode="aspectFill"></image>
				<image v-else @tap="toggleEdit(true)" style="margin-right: 20rpx;"
					:src="baseUrl+'/static/img/keyboard.png'" mode="aspectFill" class="icon"></image>
				<!-- #endif -->
				<!--输入录音切换-->
				<!-- <input type="text" v-model.trim="detailed" placeholder="街道、楼牌号等" /> -->
				<input @focus="inputFocus" v-if="mute && isEdit" disabled :focus="isFocus" :cursor-spacing="8"
					:adjust-position="false" type="text" v-model="content" class="input" placeholder="全体禁言" />
				<input @focus="inputFocus" @blur="initheight" v-if="!mute && isEdit" :focus="isFocus"
					:cursor-spacing="8" type="text" v-model="content" :disabled="grmute" class="input"
					:placeholder="tip" @confirm="send" />
				<view v-if="!isEdit" @touchstart="startVoice" @touchend="endVoice" class="input"
					style="text-align: center;">按住发言
				</view>
				<!-- 表情 -->
				<image v-if="isemo" @tap="togglePicker(200, 'emoji')" :src="baseUrl+'/static/img/emoji.png'"
					class="icon" mode="aspectFill">
				</image>
				<!-- 发送 -->
				<view @touchend.prevent="send" v-if="content.length>0" class="btn">发送</view>
				<!--附件-->
				<image @tap="togglePicker(86, 'file')" v-else :src="baseUrl+'/static/img/add.png'" class="icon"
					mode="aspectFill"></image>
			</view>
			<view class="yinyongwrap" v-if="yinyongflag" :style="{'margin-left': marginLeftValue }">
				<text
					class="cont">{{selitem.source==userId?'我':selitem.nickname}}:{{selitem.msgType === 'txt' ? selitem.content : (selitem.msgType === 'img' ? '[图片]' : (selitem.msgType === 'video' ? '[视频]' : '[未知类型]'))}}</text>
				<view  @click="closeyinyong"  style="position: absolute;right: 4rpx;top: 50%;transform: translateY(-50%);">
					<u-icon name="close-circle"  size="18"></u-icon>
				</view>
			</view>
			<view class="empty"></view>
		</view>
		<!--表情-->
		<view v-if="showEmoji" class="emoji" @tap.prevent.stop="">
			<view class="titemo">
				<image :src="baseUrl+'/static/img/emoji.png'" mode="aspectFill"
					@click.stop="showEmo1=true,showEmo2=false"></image>
				<!-- <image :src="baseUrl+'/static/emjoy/top2.png'" mode="aspectFill" @click="showEmo2=true,showEmo1=false"></image> -->
			</view>
			<view class="list" v-show="showEmo1">
				<view class="item" @tap="content += item" v-for="(item, index) in emojis" :key="index">{{ item }}</view>
			</view>
			<!-- <view class="list2" v-show="showEmo2">
				<view class="itemii" v-for="(item,index) in titlist  " :key="index" @click="sendemo(item.image)">
					<image :src="item.image" mode=""></image>
					<text>{{item.text}}</text>
				</view>

			</view> -->
		</view>
		<!--附件-->
		<view v-if="showFile" class="file" @tap.prevent.stop="">
			<view class="list flex-row">
				<!-- #ifdef MP-WEIXIN -->
				<view class="item flex-column" @tap.stop="right">
					<image
						src="https://images.fudiemall.com/storage/default/20250418/sdasdddsbff29acad0b0fda835b3598212200d2a6278933e.png"
						mode="widthFix" class="icon"></image>
					<view class="text">群信息</view>
				</view>
				<!-- #endif -->

				<view class="item flex-column" @tap.stop="sendImage()">
					<image :src="baseUrl+ '/static/image/album2.png'" mode="aspectFill" class="icon"></image>
				</view>
				<view class="item flex-column" @tap.stop="sendPrivateVideo()">
					<image :src="baseUrl+ '/static/image/photo2.png'" mode="aspectFill" class="icon"></image>
				</view>

				<view class="item flex-column" @click="toAllgoods" v-if="isAstore">
					<image :src="baseUrl+ '/static/image/goods2.png'" mode="aspectFill" class="icon"></image>
				</view>
				<view class="item flex-column" @click="showOrder = true" v-if="isAstore">
					<image :src="baseUrl+ '/static/image/order2.png'" mode="aspectFill" class="icon"></image>
				</view>
				<view class="item flex-column" @tap.stop="strollStorre()" v-if="isAstore">
					<image :src="baseUrl+ '/static/image/jdkk.png'" mode="aspectFill" class="icon"></image>
				</view>

				<!-- <view class="item flex-column" @tap="getLocation">
					<image src="/static/img/location.png" mode="widthFix" class="icon"></image>
					<view class="text">位置</view>
				</view> -->
			</view>
		</view>
		<u-overlay :show="istxtshow" @click="istxtshow = false">
			<view class="warpssss">
				{{txtcontent}}
			</view>
		</u-overlay>
		<u-popup :show="ischehui" mode="center" @close="ischehui = false" closeable bgColor="transparent">
			<view class="prompt flex_ZC">
				<text class="f36">提示</text>
				<text class="prompt_tit">是否要撤回该消息?</text>
				<view class="prompt_ntm flex_ld_a">
					<text @click="ischehui = false">取消</text>
					<text @click.stop="chehui()">确定</text>
				</view>
			</view>
		</u-popup>

		<u-popup :show="showOrder" mode="bottom" @close="closePopup" :safeAreaInsetBottom="false" closeable
			bgColor="transparent">
			<view class=" order_list flex_ZC">
				<view class=" order_top flex_c">
					<text>请选择相应的订单</text>
				</view>
				<scroll-view scroll-y="true" class="scroll-box ">
					<view class="order_box flex_ZC" v-for="(item,index) in orderList" :key="index">
						<view class="order_box_t flex_ld">
							<text class="f24 c9">下单时间：{{item.create_time}}</text>
							<text class="f24 c1" v-if="item.status==1">待支付</text>
							<text class="f24 c1" v-if="item.status==2">待发货</text>
							<text class="f24 c1" v-if="item.status==3">待收货</text>
							<text class="f24 c1" v-if="item.status==4">待评价</text>
							<text class="f24 c1" v-if="item.status==5">已完成</text>
							<text class="f24 c1" v-if="item.status==6">已取消</text>
						</view>
						<view class="order_goods flex_dq" v-for="(iten,ind) in item.detail" :key="iten.order_id">
							<image class="order_icon" :src="iten.image" mode="aspectFill"></image>
							<view class="order_goods_r flex_Z">
								<text class="f30 c3 overflow1">{{iten.goods_name}}</text>
								<text class="f24 c9">商品规格</text>
								<view class="specifications flex_dq">
									<text class="f30 c1">￥</text>
									<text class="f36 c1 moneys">{{iten.pay_price}}</text>
									<text class="f30 c9">x{{iten.num}}</text>
									<text class="send_order" v-if="ind == item.detail.length-1"
										@click="pushHxMessage(item)">发送</text>
								</view>
							</view>
						</view>
					</view>
					<noDatas :xxxList="orderList" :status="status"></noDatas>
				</scroll-view>
			</view>
		</u-popup>

		<!--语音-->
		<!-- <my-voice v-show="showVoice"></my-voice> -->

	</view>

</template>

<script>
	import emoji from '../../utils/emoji.js'
	import myVoice from '@/components/self-voice/index.vue'
	import {
		myuser
	} from "../../api/user.js";
	import {
		checkSeller,
		customerOrder,
		pushHxMessage
	} from "@/api/shoppingCart.js"
	const innerAudioContext = uni.createInnerAudioContext()
	const recorderManager = uni.getRecorderManager()
	import WebIM from "../../utils/WebIM.js"
	export default {
		components: {
			myVoice
		},
		data() {
			return {
				baseUrl: this.$imageBaseUrl,
				emojis: [],
				isEdit: true,
				isFocus: false,
				showEmoji: false,
				showFile: false,
				showVoice: false,
				// #ifdef MP-WEIXIN
				scrollHeight: '0', // 内容区域高度
				// #endif
				statusBarHeight: 0, // 状态栏高度
				scrollViewId: '', // 滚动到最底部
				voicePlayingId: '', // 正在播放的消息ID
				content: '',
				list: [],
				socketOpen: false,
				socketMsgQueue: [],
				groupId: '',
				userId: "",
				toUserName: '',
				client: '',
				user: null,
				tit: "",
				groupname: "",
				groupid: "",
				groupinfo: {},
				mute: 0,
				tip: "请输入内容",
				is_admin: "",
				showReminder: true,
				bottomHeight: 0,
				scrtop: '',
				onVideoSrc: "",
				isapp: false,
				backgroundColor: "",
				showEmo1: true,
				showEmo2: false,
				isemo: true,
				grmute: false,
				cursor: '',
				open: true,
				titleHeight: 0, // 标题栏高度
				showtools: false,
				selid: 0, //选中的会话id
				ischehui: false, //撤回
				selitem: {}, //选择消息体
				ischehuiFlag: false, //撤回消息弹窗
				yinyongflag: false, //是否引用
				istxtshow: false,
				showOrder: false,
				txtcontent: "",
				descHeight: 0,
				isAstore: false, //是否是商家
				astoreId: "", //商家id
				page: 1,
				size: 10,
				orderList: [], //在当前商家的订单
				status: "loadmore"
			}
		},
		onReady() {
			// #ifdef MP-ALIPAY 
			let navbarInfo = JSON.parse(uni.getStorageSync("navbarInfo"))
			this.statusBarHeight = navbarInfo.statusBarHeight;
			this.titleHeight = navbarInfo.titleHeight;
			// #endif


			// #ifdef MP-WEIXIN 
			uni.getSystemInfo({
				success: res => {
					this.statusBarHeight = res.statusBarHeight
				}
			})
			
			const custombar = uni.getMenuButtonBoundingClientRect();
			this.titleHeight = (custombar.top - this.statusBarHeight) * 2 + custombar.height
			console.log(this.titleHeight);
		// #endif

			
				

		},
		onHide() {
			uni.onKeyboardHeightChange()
			
		},
		// 页面滚动
		onPageScroll: function(e) {
			const scrollTop = e.scrollTop; // 获取页面滚动位置
			// 根据滚动位置修改状态栏样式
			if (scrollTop > 20) {
				this.backgroundColor = '#ffffff';
			} else {
				this.backgroundColor = '';
			}
			// console.log("滚动距离为：" + e.scrollTop);
		},
		onLoad(options) {
			console.log(options, "传参")
			this.groupid = options.id

			console.log(this.groupid, "群聊id")
			this.getcheckSeller()
			this.geterror()
			// 获取聊天用户信息
			this.getnameandimg()
			// this.groupdetail()
			// 初始化内容高度
			// 
			this.onTextMessage()
			// 结束录音
			recorderManager.onStop(res => {
				this.upload(res.tempFilePath)
			})

			// // 结束播放
			innerAudioContext.onEnded(res => {
				this.voicePlayingId = ''
			})

			// 导入表情
			this.emojis = emoji
		},
		onHide() {
			innerAudioContext.stop()
		},
		onShow() {
			this.getuser()
			setTimeout(() => {
				this.ydmsg()
			}, 1000)
			setTimeout(() => {
				this.getmsglist()
			}, 500)
			// #ifdef MP-WEIXIN
			this.isapp = true
			// #endif

		},
		onBackPress() {
			if (this.showFile || this.showEmoji) {
				this.showFile = false
				this.showEmoji = false
				this.setScrollHeight(0)
				return true
			}
			return false
		},
		// onNavigationBarButtonTap() {
		// 	this.toPage('/pages/message/group/set?groupId=' + this.groupId)
		// },
		computed: {
			marginTopValue() {
				return this.yinyongflag ? "20rpx" : "40rpx";
			},
			marginLeftValue() {
				return this.content.length > 0 ? "0rpx" : "22rpx";
			},

			scrollHeight() {
				const systemInfo = uni.getSystemInfoSync();
				console.log(systemInfo);
				let windowHeight = systemInfo.windowHeight
				let statusBarHeight = systemInfo.statusBarHeight;
				let windowWidth = systemInfo.windowWidth;
				const rpxToPx = windowWidth / 750; // 计算 rpx 转 px 比例

				// #ifdef MP-ALIPAY || MP-WEIXIN
				let navbarInfo = JSON.parse(uni.getStorageSync("navbarInfo"))
				let titleHeight = systemInfo.titleBarHeight;
				return Math.floor(windowHeight - (Math.ceil(this.bottomHeight * rpxToPx) + Math.ceil(180 * rpxToPx))) +
					'px'
				// #endif
				// #ifdef H5
				return Math.floor(windowHeight - (statusBarHeight + Math.ceil(this.bottomHeight * rpxToPx) + 44 +
						Math.ceil(180 * rpxToPx))) +
					'px'
				// #endif
			}
		},
		methods: {
			// 验证是否时商家,商家时可以选择订单或商品推送
			getcheckSeller() {
				let data = {
					user_id: this.groupid
				}
				checkSeller(data).then(res => {
					this.isAstore = res.data.is_seller
					if (res.data.is_seller) {
						this.astoreId = res.data.seller_info.id
						this.getorder()
					}
					console.log(this.isAstore, this.astoreId, "商家信息");
				})
			},
			getorder() {
				let data = {
					seller_id: this.astoreId,
					page_no: this.page,
					page_size: this.size
				}
				customerOrder(data).then(res => {
					console.log(res, '订单点歌单');
					let list = res.data.list;
					this.orderList = this.page == 1 ? list : this.orderList.concat(list);
					console.log(this.goodsList);
					if (list.length < this.size) this.status = 'nomore';
					else this.status = 'loading';
				})
			},
			pushHxMessage(item) {
				let data = {
					to_user: this.groupid,
					data_id: item.id,
					type: 2
				}
				pushHxMessage(data).then(res => {
					console.log(res);
					if (res.data.is_push_success == true) {
						uni.$u.toast('发送成功')
						this.showOrder = false
					}
				})
			},
			toAllgoods() {
				uni.navigateTo({
					url: '/pageDao/groupchat/allshop?id=' + this.astoreId
				})
			},
			getnameandimg() {
				let users = this.groupid
				uni.WebIM.conn.fetchUserInfoById(users).then((res) => {
					console.log('聊天---', res);
					this.user = res.data[users]
					console.log('聊天22', this.user);
					this.tit = res.data[users].nickname
					// #ifdef MP-ALIPAY
					// 设置导航栏标题
					my.setNavigationBar({
						title: res.data[users].nickname,
						frontColor: '#000000',
						backgroundColor: '#F9EDCC ',
					})
					// #endif
					console.log(res.data[users].nickname, "查看水水水水水水水");
				});
			},
			closeyinyong() {
				this.selitem = {}
				this.yinyongflag = false
			},
			gohomes(item) {
				if (item.customEvent == "local_seller_homepage") {
					uni.navigateTo({
						url: "/pagesMy/groundCat/merchantHomepagew?id=" + item.pid
					})
				} else if (item.customEvent == "shop_seller_homepage") {
					uni.navigateTo({
						url: "/pagesMy/cloudCat/shopDetails?id=" + item.pid
					})
				} else if (item.customEvent == 'shop_goods') {
					uni.navigateTo({
						url: "/pagesMy/cloudCat/goodsDetails?id=" + item.push_exts.goods_id
					})
				} else if (item.customEvent == 'local_goods') {
					uni.navigateTo({
						url: "/pagesMy/groundCat/groupBuyingDetails?id=" + item.pid
					})
				} else if (item.customEvent == 'shop_order') {
					uni.navigateTo({
						url: "/pageOrder/aboutorder/orderdetail?id=" + item.push_exts.id
					})
				} else if (item.customEvent == 'shop_seller_goods') {
					uni.navigateTo({
						url: "/pagesMy/cloudCat/goodsDetails?id=" + item.push_exts.goods_id
					})
				}
			},

			getyinyongs(item) {
				if (item.msgType == 'txt') {
					this.istxtshow = true
					this.txtcontent = item.content
				} else if (item.msgType == 'img') {
					this.preview(item.url)
				} else if (item.msgType == 'video') {
					this.govideo(item.url)
				}
			},
			changeyinyong(item) {
				this.yinyongflag = true
				this.selitem = item
			},
			goforwarding(item) {
				uni.setStorageSync("forwardingitem", item)
				uni.navigateTo({
					url: "/pageDao/groupchat/forwardinglist"
				})
			},
			clickchehui(item) {
				this.selitem = item
				this.ischehui = true

			},
			// 关闭订单发送
			closePopup() {
				this.showOrder = false
			},
			chehui() {
				let that = this
				let option = {
					// 要撤回消息的消息 ID。
					mid: that.selitem.id,
					// 消息接收方：单聊为对方用户 ID，群聊和聊天室分别为群组 ID 和聊天室 ID。
					to: that.selitem.target,
					// 会话类型：单聊、群聊和聊天室分别为 `singleChat`、`groupChat` 和 `chatRoom`。
					chatType: "singleChat",
					// 撤回消息自定义字段。
					ext: 'ext'
				};
				uni.WebIM.conn.recallMessage(option)
					.then((res) => {
						that.showtools = false
						that.ischehui = false
						that.list = that.list.filter(item => {
							return item.id !== that.selitem.id;
						});
						console.log("新的数据", that.list)
						uni.$u.toast("撤回消息成功")
						console.log("success", res);

					})
					.catch((error) => {
						if (error.type == 504) {
							that.ischehui = false
							uni.$u.toast("撤回消息时超过2分钟")
						} else {
							uni.$u.toast("撤回失败")
							that.ischehui = false
						}
						that.showtools = false
						// 消息撤回失败，原因可能是超过了撤销时限(超过 2 分钟)。
						console.log("fail", error);
					});
			},
			tools(item) {
				this.selid = item.id
				console.log(item, "sss")
				this.showtools = true
			},
			// 复制
			copymes(item) {
				let that = this
				if (item.msgType == 'txt') {
					uni.setClipboardData({
						data: item.content,
						success: function() {
							that.showtools = false
							uni.$u.toast("复制成功")
						}
					});
				} else {
					uni.$u.toast("其他格式不支持复制")
				}

				console.log(item)
			},
			govideo(url) {
				uni.setStorageSync("videourl", url)
				uni.navigateTo({
					url: "/pageDao/groupchat/playvideo"
				})
			},

			ydmsg() {
				let option = {
					chatType: "singleChat", // 会话类型，设置为群聊。
					type: "channel", // 消息类型。channel 表示会话已读回执。
					to: this.groupid, // 接收消息对象的用户 ID。
				};
				console.log("已读回执", option)
				let msg = uni.WebIM.message.create(option);
				uni.WebIM.conn.send(msg);
			},
			onIsVideo(src) {
				// 获取视频地址
				this.onVideoSrc = src
				// 获取 video 上下文 videoContext 对象
				this.videoContext = uni.createVideoContext('video_play');
				// 进入全屏状态
				this.videoContext.requestFullScreen();
			},
			geterror() {
				let that = this
				uni.WebIM.conn.addEventHandler("onError", {
					onError: function(ress) {
						console.log(ress, "失败")
						if (ress.type == 28 || ress.type == 32 || ress.type == 39 || ress.type == 1 || ress
							.type == 700) {
							that.getuser()
						}
						if (ress.type == 16) {
							that.getuser()
							uni.$u.tosat("网络异常")
						}

						// that.getgrouplist()
						// console.log("qwdqwd", ress)
					}

				})
			},
			getmsglist(numbers) {
				uni.showLoading({
					title: "加载中"
				})
				console.log('调用 getmsglist', numbers);

				let cursorValue = numbers ? this.cursor : -1;
				console.log('当前 cursor:', cursorValue);
				let options = {
					targetId: this.groupid,
					pageSize: 50,
					cursor: cursorValue,
					chatType: "singleChat",
					searchDirection: "up",
				};

				uni.WebIM.conn.getHistoryMessages(options).then(res => {
					console.log("消息漫游拉取成功", res);
					console.log("消息漫游传参", options);
					this.cursor = res.cursor;
					let alist = res.messages.map(item => {
						if (item.type == 'custom') {
							return {
								id: item.id,
								url: item.customExts.image,
								msgType: item.type,
								name: item.customExts.name,
								price: item.customExts.price,
								source: item.from,
								target: item.to,
								time: item.time,
								nickname: item.ext.nickname,
								head_img: item.ext.head_img,
								customEvent: item.customEvent,
								pid: item.customExts.id,
								rate: item.customExts.rate,
								stock: item.customExts.stock,
								push_exts: JSON.parse(item.customExts.push_exts)
							}
						} else {
							return {
								id: item.id,
								content: item.msg,
								msgType: item.type,
								source: item.from,
								target: item.to,
								nickname: item.ext.nickname,
								head_img: item.ext.head_img,
								time: item.time,
								url: item.url,
								thumb: item.thumb,
								width: item.width,
								height: item.height,
								video_thumb: item.ext.video_thumb,
								quote_msg: item.ext.quote_msg
							};
						}

					});

					if (numbers) {
						this.list = alist.reverse().concat(this.list);
						console.log('消息长度:', alist.length);
						this.open = alist.length >= 50;
						if (alist.length >= 50) {
							this.open = true
							uni.$u.toast("加载成功")
						} else {
							this.open = false
							uni.$u.toast("没有更多了")
						}
					} else {
						this.list = alist.reverse();
					}

					console.log('消息列表:', this.list);
					console.log('是否开启:', this.open);
					if (!numbers) {
						setTimeout(() => {
							// #ifdef MP-WEIXIN
							this.setScrollHeight(0);
							// #endif

							this.initScrollBar();
						}, 50);
					}
					// 确保 DOM 更新完成后再设置滚动条

				}).catch(e => {
					console.error("获取消息失败", e);
					console.error("获取消息失败传参", options);
				});
				console.log(this.cursor, "牛逼---------------------------")
				uni.hideLoading()
			},
			onTextMessage(res) {
				let that = this
				uni.WebIM.conn.addEventHandler("onTextMessage", {
					onTextMessage: function(ress) {
						console.log(ress, 'onTextMessage');
						let aaa = ress
						if (aaa.from == that.groupid) {
							that.list.push({
								id: aaa.id,
								content: aaa.msg,
								msgType: aaa.type,
								source: aaa.from,
								target: aaa.to,
								time: aaa.time,
								nickname: aaa.ext.nickname,
								head_img: aaa.ext.head_img,
								quote_msg: aaa.ext.quote_msg,
							})

							that.initScrollBar()
						}
						// console.log("666", aaa)

						// console.log("qwdqwd", ress)
					}

				})
				uni.WebIM.conn.addEventHandler("onImageMessage", {
					onImageMessage: function(ress) {
						let aaa = ress
						if (aaa.from == that.groupid) {
							that.list.push({
								id: aaa.id,
								url: aaa.url,
								msgType: aaa.type,
								source: aaa.from,
								target: aaa.to,
								time: aaa.time,
								nickname: aaa.ext.nickname,
								head_img: aaa.ext.head_img,
								width: aaa.width,
								height: aaa.height
							})
							that.initScrollBar()
						}
						// console.log("666", aaa)

						// console.log("qwdqwd", ress)
					}
				})
				uni.WebIM.conn.addEventHandler("onVideoMessage", {
					onVideoMessage: function(ress) {
						let aaa = ress
						if (aaa.from == that.groupid) {
							that.list.push({
								id: aaa.id,
								url: aaa.url,
								msgType: aaa.type,
								source: aaa.from,
								target: aaa.to,
								time: aaa.time,
								thumb: aaa.thumb,
								nickname: aaa.ext.nickname,
								head_img: aaa.ext.head_img,
								video_thumb: aaa.ext.video_thumb
							})
							that.initScrollBar()
						}
						// console.log("666", aaa)

						// console.log("qwdqwd", ress)
					}
				})
				uni.WebIM.conn.addEventHandler("onAudioMessage ", {
					onAudioMessage: function(ress) {
						let aaa = ress
						if (aaa.from == that.groupid) {
							that.list.push({
								id: aaa.id,
								url: aaa.url,
								msgType: aaa.type,
								source: aaa.from,
								target: aaa.to,
								time: aaa.time,
								// thumb: aaa.thumb,
								nickname: aaa.ext.nickname,
								head_img: aaa.ext.head_img
							})
							that.initScrollBar()
						}
						// console.log("666", aaa)

						// console.log("qwdqwd", ress)
					}
				})
				uni.WebIM.conn.addEventHandler("MESSAGES", {
					onRecallMessage: function(ress) {
						let aaa = ress
						that.list = that.list.filter(item => {
							return item.id !== aaa.mid;
						});
						console.log("撤回消息监听", aaa)

						// console.log("qwdqwd", ress)
					}
				})
				uni.WebIM.conn.addEventHandler("eventName", {
					onCustomMessage: function(ress) {
						let aaa = ress
						if (aaa.customEvent == 'shop_seller_homepage' || aaa.customEvent ==
							'local_seller_homepage' || aaa.customEvent == 'shop_goods' || aaa
							.customEvent == 'local_goods' || aaa.customEvent == 'shop_order' || aaa
							.customEvent == 'shop_seller_goods') {
							that.list.push({
								id: aaa.id,
								url: aaa.customExts.image,
								msgType: aaa.type,
								name: aaa.customExts.name,
								price: aaa.customExts.price,
								source: aaa.from,
								target: aaa.to,
								time: aaa.time,
								// thumb: aaa.thumb,
								nickname: aaa.ext.nickname,
								head_img: aaa.ext.head_img,
								customEvent: aaa.customEvent,
								pid: aaa.customExts.id,
								rate: aaa.customExts.rate,
								stock: aaa.customExts.stock,
								push_exts: JSON.parse(aaa.customExts.push_exts)
							})
						}
						that.initScrollBar()
						console.log(ress, "自定义消息")
					},
				});
			},
			isNotEmptyObject(obj) {
				if (obj === null || obj === undefined) {
					return false;
				}
				return typeof obj === 'object' && Object.keys(obj).length > 0;
			},
			// 发送消息
			send() {
				// this.pushMessage(this.content, 'text', ()=>{
				// 	this.content = ''
				// })

				// delete this.selitem.quote_msg

				let option = {
					// 消息类型。
					type: "txt",
					// 消息内容。
					msg: this.content,
					// 消息接收方：单聊为对方用户 ID，群聊和聊天室分别为群组 ID 和聊天室 ID。
					to: this.groupid,
					// 会话类型：单聊、群聊和聊天室分别为 `singleChat`、`groupChat` 和 `chatRoom`，默认为单聊。
					chatType: "singleChat",
					// msgConfig: { allowGroupAck: true } // 设置此消息需要已读回执。
					ext: {
						quote_msg: this.yinyongflag ? this.selitem : {},
						nickname: this.user.nickname,
						head_img: this.user.avatar,
						groupname: this.user.nickname,
						groupheadimg: this.user.avatar
					},
				};
				console.log(option);
				// 创建文本消息。
				let msg = uni.WebIM.message.create(option);
				// 调用 `send` 方法发送该文本消息。
				uni.WebIM.conn.send(msg).then((res) => {
					let aaa = res.message
					this.list.push({
						id: aaa.id,
						content: aaa.msg,
						msgType: aaa.type,
						source: aaa.from,
						target: aaa.to,
						time: aaa.time,
						nickname: aaa.ext.nickname,
						head_img: aaa.ext.head_img,
						quote_msg: aaa.ext.quote_msg
					})
					this.yinyongflag = false
					this.content = ''
					console.log("Send message success", res);
				}).catch((e) => {
					console.log("Send message fail", e);
					if (e.type == 506) {
						uni.$u.toast("全体禁言中")
					}
					if (e.type == 507) {
						uni.$u.toast("你已被禁言，请联系管理员")
					}
				});

				this.initScrollBar()

			},
			rightasdasd() {
				console.log("878787fsdf")
			},
			login() {
				let that = this
				var options = {
					user: that.user.id.toString(),
					accessToken: that.user.hx_im_token,
					appKey: uni.WebIM.config.appkey
				};
				console.log(options, "登陆数据")
				uni.setStorageSync("hx_token", that.user.hx_im_token)
				uni.WebIM.conn.open(options).then(res => {

				})
				// console.log("登录成功")

				// console.log("登录成功")

			},
			getuser() {
				myuser().then(res => {
					console.log('用户信息--', res);
					if (res.code == 1) {
						this.user = res.data
						this.userId = res.data.id
						this.login()
						// console.log("用户信息",this.user)

					}
				})
			},
			right() {
				console.log("出发了")
				uni.navigateTo({
					url: "/pageDao/groupchat/groupdetail?id=" + this.groupinfo.hx_group_id
				})
			},
			leftClick() {
				//获取页面栈的长度
				const canNavBack = getCurrentPages()
				console.log(canNavBack.length);
				// 判断是否刷新了浏览器，刷新了浏览器，页面栈只有当前一个
				if (canNavBack.length > 1) {
					uni.navigateBack({
						delta: 1
					})
				} else {
					uni.switchTab({
						url: '/pages/index/cloudCatIndex'
					})
				}
			},
			// 初始化滚动
			initScrollBar() {
				setTimeout(() => {
					this.scrollViewId = ''
					setTimeout(() => {
						this.scrollViewId = 'bottom'
						setTimeout(() => {
							this.scrollViewId = ''
							console.log('初始化------------');
						}, 100)
					}, 100)
				}, 100)
			},
			// 监听输入聚焦
			inputFocus(e) {
				this.showFile = false
				this.showEmoji = false
				console.log(e.detail.height, 'e.detail.heighte.detail.heighte.detail.height')
				this.bottomHeight = 0
				// #ifdef MP-WEIXIN
				// this.$nextTick(() => {
				// 	this.setScrollHeight(e.detail.height)
					this.initScrollBar()
				// })
				// #endif
			},
			// 设置scroll的高度
			setScrollHeight(descHeight = 0) {
				// #ifdef MP-WEIXIN
				this.scrollHeight = `calc(100vh - 180rpx - ${descHeight}px)`
				// #endif
				// #ifdef APP-PLUS
				this.scrollHeight = `calc(100vh - 88upx - ${descHeight}px)`
				// #endif
				// // #ifdef H5
				// this.scrollHeight = `calc(100vh - 88rpx - ${descHeight}px)`
				// // #endif
				console.log(this.scrollHeight);
			},
			initheight() {
				this.bottomHeight = 0
			},
			// 切换选择
			togglePicker(height = 0, type = '') {
				this.showEmoji = false
				this.showFile = false
				this.showtools = false
				let status = height > 0 ? true : false

				switch (type) {
					case 'emoji':
						this.bottomHeight = 340
						this.showEmoji = status;
						break
					case 'file':
						this.bottomHeight = 152
						this.showFile = status;
						break
				}
				this.isEdit = true

				setTimeout(() => {
					// // #ifdef H5
					// this.setScrollHeight(0)
					// // #endif
					// 
					this.initScrollBar()
				}, 50)
			},
			// 切换语音与编辑
			toggleEdit(bool) {
				this.isEdit = bool
				this.isFocus = bool
				// #ifdef MP-WEIXIN
				this.setScrollHeight(0)
				// #endif
			},
			// 开始录音
			startVoice() {
				console.log(123456, '开始录音');
				this.showVoice = true
				recorderManager.start()
			},
			// 结束录音
			endVoice() {
				this.showVoice = false

				recorderManager.stop()
				recorderManager.onStop(res => {
					console.log(res)
					this.sendPrivateAudio(res.tempFilePath)
					console.log(res.tempFilePath)
				})

			},
			// 播放录音
			playVoice(item) {
				this.voicePlayingId = item.url
				innerAudioContext.src = item.url
				innerAudioContext.play()
				// if (this.voicePlayingId) {
				// 	this.voicePlayingId = ''
				// } else {
				// 	this.voicePlayingId = item.id
				// 	innerAudioContext.src = item.url
				// 	innerAudioContext.play()
				// }
			},
			sendPrivateAudio(tempFilePath) {
				let that = this
				if (that.mute == true) {
					uni.$u.toast("全体禁言中")
				} else {

					var str = uni.WebIM.config.appkey.split("#");
					var token = uni.WebIM.conn.context.accessToken;
					console.log("111", token)
					var domain = uni.WebIM.conn.apiUrl;
					uni.uploadFile({
						url: domain + "/" + str[0] + "/" + str[1] + "/chatfiles",
						filePath: tempFilePath,
						name: "file",
						header: {
							Authorization: "Bearer " + token,
							"Content-Type": "multipart/form-data",
						},
						success(res) {
							console.log("详情", res)
							var dataObj = JSON.parse(res.data);
							console.log("data", dataObj)
							var option = {
								type: "audio",
								chatType: "singleChat",
								filename: tempFilePath,
								to: that.groupid,
								ext: {
									nickname: that.user.nickname,
									head_img: that.user.head_img,
									groupname: that.user.nickname,
									groupheadimg: that.user.avatar
								},
								body: {
									//文件 URL。
									url: dataObj.uri + "/" + dataObj.entities[0].uuid,
									//文件类型。
									type: "audio",
									//文件名。
									filename: tempFilePath,
									// 音频文件时长，单位为秒。
									// length: Math.ceil(duration / 1000),
								},

							};
							console.log("发送对象", option)
							let msg = uni.WebIM.message.create(option);
							// 调用 `send` 方法发送该语音消息。
							uni.WebIM.conn
								.send(msg)
								.then((res) => {

									let aaa = res.message
									console.log("dqwdwwww", aaa)
									that.list.push({
										id: aaa.id,
										url: aaa.url,
										msgType: aaa.type,
										source: aaa.from,
										target: aaa.to,
										time: aaa.time,
										nickname: aaa.ext.nickname,
										head_img: aaa.ext.head_img
									})
									console.log("消息列表", that.list)
									that.initScrollBar()
									// 语音消息成功发送。
									console.log("Success", res);
								})
								.catch((e) => {
									if (e.type == 507) {
										uni.$u.toast("你已被禁言")
									}
									// 语音消息发送失败。
									console.log("Fail", e);
								});
						},
						fail(erss) {
							console.log("失败", erss)
						}
					});
				}

			},
			// 长按
			longPress(msg) {
				let data = {
					type: 'single',
					source: this.userId,
					dest: this.groupId,
					msg: {
						id: msg.id,
						userId: msg.userId,
						groupId: msg.groupId,
						type: 'cancel',
						content: msg.content
					}
				}

				uni.sendSocketMessage({
					data: JSON.stringify(data),
					success: res => {
						// 撤销本地消息
						this.list = this.list.map(item => {
							item.type = item.id == msg.id ? 'cancel' : item.type
							return item
						})
					}
				})
			},
			// 获取位置
			getLocation() {
				uni.getLocation({
					success: res => {
						let {
							longitude
						} = res
						uni.chooseLocation({
							latitude,
							longitude,
							success: chooseRes => {
								this.pushMessage(JSON.stringify(chooseRes), 'map')
							}
						})
					}
				})
			},
			// 打开位置
			openLocation(content) {
				let {
					latitude,
					longitude
				} = JSON.parse(content)
				uni.openLocation({
					latitude,
					longitude
				})
			},
			// 上传
			upload(filePath) {
				uni.showLoading({
					title: '加载中'
				});
				uni.uploadFile({
					url: this.$api.upload,
					name: 'file',
					filePath,
					formData: {
						userId: this.userId
					},
					header: this.$util.getHeader(),
					success: res => {
						uni.hideLoading()
						let data = JSON.parse(res.data)
						this.pushMessage(data.data, 'voice')
					},
					fail: err => {
						uni.hideLoading()
					}
				})
			},
			// 发送图片
			uploadImage(sourceType = ['album']) {
				uni.chooseImage({
					sourceType,
					success: chooseImageRes => {
						const tempFilePaths = chooseImageRes.tempFilePaths

						tempFilePaths.forEach(temp => {
							uni.showLoading({
								title: '加载中'
							});
							uni.uploadFile({
								url: this.$api.upload,
								filePath: temp,
								formData: {
									userId: this.userId
								},
								name: 'file',
								header: this.$util.getHeader(),
								success: uploadRes => {
									uni.hideLoading()
									let data = JSON.parse(uploadRes.data)
									this.pushMessage(data.data, 'image')
								},
								fail: err => {
									uni.hideLoading()
								}
							})
						})
					}
				})

			},
			sendImage() {

				var me = this;
				if (me.mute == true) {
					uni.$u.toast("全体禁言中")
				} else {
					uni.chooseImage({
						count: 1,
						sizeType: ["original", "compressed"],
						sourceType: ["album"],
						success(res) {
							console.log("选择图片", res)
							me.sendPrivateImg(res);
						},
					});
				}

			},
			sendimage2(image) {
				let me = this
				var option = {
					type: "img",
					chatType: "singleChat",
					url: image,
					// 消息接收方：单聊为对方用户 ID，群聊和聊天室分别为群组 ID 和聊天室 ID。
					to: me.groupid,
					ext: {
						nickname: me.user.nickname,
						head_img: me.user.avatar,
						groupname: me.user.nickname,
						groupheadimg: me.user.avatar,

					},
				};
				console.log("图片信息", option)
				let msg = uni.WebIM.message.create(option);
				// 调用 `send` 方法发送该图片消息。
				uni.WebIM.conn
					.send(msg)
					.then((res) => {
						// 图片消息成功发送。
						console.log("Success图片", res);
						let aaa = res.message
						me.list.push({
							id: aaa.id,
							url: aaa.url,
							msgType: aaa.type,
							source: aaa.from,
							target: aaa.to,
							time: aaa.time,
							nickname: aaa.ext.nickname,
							head_img: aaa.ext.head_img,
							width: aaa.width,
							height: aaa.height
						})
						me.initScrollBar()
					})
					.catch((e) => {
						uni.$u.toast("发送失败")
						console.log("Fail", e);
						if (e.type == 506) {
							uni.$u.toast("全体禁言中")
						}
						if (e.type == 507) {
							uni.$u.toast("你已被禁言，请联系管理员")
						}
					});
			},
			sendemo(image) {


				var me = this;
				var token = uni.getStorageSync("hx_token");
				uni.getImageInfo({
					src: image,
					success(res) {
						console.log("获取图片信息", res)
						var allowType = {
							jpg: true,
							gif: true,
							png: true,
							bmp: true,
						};
						var str = uni.WebIM.config.appkey.split("#");
						var width = res.width;
						var height = res.height;
						var index = res.path.lastIndexOf(".");
						var filetype = (~index && res.path.slice(index + 1)) || "";
						var domain = uni.WebIM.conn.apiUrl + "/";
						console.log(domain, str, filetype)
						console.log(filetype, index)
						console.log(filetype.toLowerCase() in allowType)
						uni.showLoading({
							title: '加载中'
						});
						uni.uploadFile({
							url: domain + str[0] + "/" + str[1] + "/chatfiles",
							filePath: image,
							name: "file",
							header: {
								// "Content-Type": "multipart/form-data",
								// Authorization: "Bearer " + token,
							},
							success(res) {
								console.log(res, "上传图片")
								uni.hideLoading()
								if (res.statusCode == 200) {
									var data = res.data;
									var dataObj = JSON.parse(data);
									console.log("999", dataObj)
									var option = {
										type: "img",
										chatType: "singleChat",
										width: width,
										height: height,
										url: dataObj.uri + "/" + dataObj.entities[0].uuid,
										// 消息接收方：单聊为对方用户 ID，群聊和聊天室分别为群组 ID 和聊天室 ID。
										to: me.groupid,
										ext: {
											nickname: me.user.nickname,
											head_img: me.user.avatar,
											groupname: me.user.nickname,
											groupheadimg: me.user.avatar
										},
									};
									console.log("图片信息", option)
									let msg = uni.WebIM.message.create(option);
									// 调用 `send` 方法发送该图片消息。
									uni.WebIM.conn
										.send(msg)
										.then((res) => {
											// 图片消息成功发送。
											console.log("Success图片", res);
											let aaa = res.message
											me.list.push({
												id: aaa.id,
												url: aaa.url,
												msgType: aaa.type,
												source: aaa.from,
												target: aaa.to,
												time: aaa.time,
												nickname: aaa.ext.nickname,
												head_img: aaa.ext.head_img
											})
											me.initScrollBar()
										})
										.catch((e) => {
											uni.$u.toast("发送失败")
											console.log("Fail", e);
											if (e.type == 506) {
												uni.$u.toast("全体禁言中")
											}
											if (e.type == 507) {
												uni.$u.toast("你已被禁言，请联系管理员")
											}
										});
								} else if (res.statusCode === 400) {
									// 图片上传阿里云检验不合法
									var errData = JSON.parse(res.data);
									if (errData.error === "content improper") {
										uni.showToast({
											title: "图片不合法",
										});
										return false;
									}
								} else {
									uni.$u.toast("发送失败")
								}

							},
							fail(erss) {
								uni.$u.toast("发送失败")
							}
						});

					},
				});
			},
			sendPrivateImg(res) {
				var me = this;
				var tempFilePaths = res.tempFilePaths;
				var token = uni.getStorageSync("hx_token");
				uni.getImageInfo({
					src: res.tempFilePaths[0],
					success(res) {
						console.log("获取图片信息", res)
						var allowType = {
							jpg: true,
							gif: true,
							png: true,
							bmp: true,
						};
						var str = uni.WebIM.config.appkey.split("#");
						var width = res.width;
						var height = res.height;
						var index = res.path.lastIndexOf(".");
						var filetype = (~index && res.path.slice(index + 1)) || "";
						var domain = uni.WebIM.conn.apiUrl + "/";
						console.log(domain, str, filetype)
						console.log(filetype, index)
						console.log(filetype.toLowerCase() in allowType)
						uni.showLoading({
							title: '加载中'
						});
						uni.uploadFile({
							url: domain + str[0] + "/" + str[1] + "/chatfiles",
							filePath: tempFilePaths[0],
							name: "file",
							header: {
								// "Content-Type": "multipart/form-data",
								// Authorization: "Bearer " + token,
							},
							success(res) {
								console.log(res, "上传图片")
								uni.hideLoading()
								if (res.statusCode == 200) {
									var data = res.data;
									var dataObj = JSON.parse(data);
									console.log("999", dataObj)
									var option = {
										type: "img",
										chatType: "singleChat",
										width: width,
										height: height,
										url: dataObj.uri + "/" + dataObj.entities[0].uuid,
										// 消息接收方：单聊为对方用户 ID，群聊和聊天室分别为群组 ID 和聊天室 ID。
										to: me.groupid,
										ext: {
											nickname: me.user.nickname,
											head_img: me.user.avatar,
											groupname: me.user.nickname,
											groupheadimg: me.user.avatar
										},
									};
									console.log("图片信息", option)
									let msg = uni.WebIM.message.create(option);
									// 调用 `send` 方法发送该图片消息。
									uni.WebIM.conn
										.send(msg)
										.then((res) => {
											// 图片消息成功发送。
											console.log("Success图片", res);
											let aaa = res.message
											me.list.push({
												id: aaa.id,
												url: aaa.url,
												msgType: aaa.type,
												source: aaa.from,
												target: aaa.to,
												time: aaa.time,
												nickname: aaa.ext.nickname,
												head_img: aaa.ext.head_img,
												width: aaa.width,
												height: aaa.height
											})
											me.initScrollBar()
										})
										.catch((e) => {
											uni.$u.toast("上传图片失败")
											console.log("Fail", e);
											if (e.type == 506) {
												uni.$u.toast("全体禁言中")
											}
											if (e.type == 507) {
												uni.$u.toast("你已被禁言，请联系管理员")
											}
										});
								} else if (res.statusCode === 400) {
									// 图片上传阿里云检验不合法
									var errData = JSON.parse(res.data);
									if (errData.error === "content improper") {
										uni.showToast({
											title: "图片不合法",
										});
										return false;
									}
								} else {
									uni.$u.toast("上传图片失败")
								}

							},
							fail(erss) {
								uni.$u.toast("上传图片失败")
							}
						});

					},
				});
			},
			sendPrivateVideo() {
				var me = this;
				if (me.mute == true) {
					uni.$u.toast("全体禁言中")
				} else {
					var token = uni.getStorageSync("hx_token")
					uni.chooseVideo({
						sourceType: ["album", "camera"],
						maxDuration: 30,
						camera: "back",
						success(res) {
							console.log("选择视频", res)
							var tempFilePaths = res.tempFilePath;
							var str = uni.WebIM.config.appkey.split("#");
							var domain = uni.WebIM.conn.apiUrl + '/'
							uni.showLoading({
								title: '加载中'
							});
							uni.uploadFile({
								url: domain + str[0] + "/" + str[1] + "/chatfiles",
								filePath: tempFilePaths,
								name: "file",
								header: {
									// "Content-Type": "multipart/form-data",
									// Authorization: "Bearer " + token
								},
								success(res) {
									uni.hideLoading()
									if (res.statusCode == 200) {
										var data = res.data;
										var dataObj = JSON.parse(data);
										console.log("999", dataObj)
										var option = {
											// 消息类型。
											type: "video",
											// 会话类型：单聊、群聊和聊天室分别为 `singleChat`、`groupChat` 和 `chatRoom`。
											chatType: "singleChat",
											// 文件名。
											filename: "filename",
											// 消息接收方：单聊为对方用户 ID，群聊和聊天室分别为群组 ID 和聊天室 ID。
											to: me.groupid,
											body: {
												//文件 URL。
												url: dataObj.uri + "/" + dataObj.entities[0]
													.uuid,
												//文件类型。
												type: "video",
												//文件名称。
												filename: "filename",
											},
											ext: {
												nickname: me.user.nickname,
												head_img: me.user.avatar,
												groupname: me.user.nickname,
												groupheadimg: me.user.avatar
											},
										}
										console.log("消息", option)
										let msg = uni.WebIM.message.create(option);
										// 调用 `send` 方法发送该视频消息。
										uni.WebIM.conn.send(msg).then((res) => {
											let aaa = res.message
											me.list.push({
												id: aaa.id,
												url: aaa.url,
												msgType: aaa.type,
												source: aaa.from,
												target: aaa.to,
												time: aaa.time,
												thumb: aaa.thumb,
												nickname: aaa.ext.nickname,
												head_img: aaa.ext.head_img
											})
											console.log(me.list, "列表")
											me.initScrollBar()
											// 视频消息成功发送。
											console.log("Success", res);
										}).catch((e) => {
											if (e.type == 507) {
												uni.$u.toast("你已被禁言")
											}
											console.log("Fail", e);
										});
									} else {
										uni.$u.toast("视频发送失败")
									}
									console.log('上传视频', res)

								},
								fail(e) {
									uni.$u.toast("视频发送失败")
								}
							});
						}
					});
				}

			},
			// 预览图片
			preview(url) {
				uni.previewImage({
					urls: [url]
				})
			},
			// 进店
			strollStorre() {
				uni.navigateTo({
					url: '/pagesMy/cloudCat/shopDetails?id=' + this.astoreId
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		height: 100vh;
		background-color: #F3F3F3;
	}

	// .container {
	// 	position: relative;
	// 	// background-color: #FFF;
	// 	height: 100vh;
	// 	overflow: hidden;
	// 	background-color: #F3F3F3;
	// }

	/* #ifdef H5 */
	// .container {
	// 	position: relative;
	// 	// height: calc(100vh - 88upx);
	// 	height: 100vh;
	// 	background-color: #F3F3F3;
	// }

	/* #endif */

	.scroll {
		// position: absolute;
		width: 750rpx;
		transition: all 0.1s ease;
		// background: red;

		.item-space {
			height: 30rpx;
		}

		.time {
			color: #666;
			font-size: 24rpx;
			text-align: center;
			margin-bottom: 20rpx;
		}

		.item {
			display: flex;
			// margin: 0 30upx 30upx;
			align-items: flex-start;
			justify-content: flex-start;

			.face {
				margin-top: 40rpx;
				width: 80upx;
				height: 80upx;
				border-radius: 20upx;
			}

			.content {
				color: #000;
				font-size: 32upx;
				min-height: 80upx;
				border-radius: 10upx;
				padding: 20upx 24upx;
				background-color: #fff;
				word-break: break-all;
				word-wrap: break-word;
				// max-width: calc(100% - 100upx - 120upx);
				max-width: 500rpx;
				position: relative;
				text-align: left;

				&::before {
					content: '';
					width: 0;
					height: 0;
					border-right: 30upx solid #FFF;
					border-top: 20upx solid transparent;
					border-bottom: 20upx solid transparent;
					position: absolute;
					top: 24upx;
				}

				.voice-icon {
					width: 32upx;
					height: 40upx;
					margin-right: 180upx;
					margin-bottom: -8upx;
				}
			}

			&.left {
				text-align: left;

				.face {
					margin-right: 30upx;
				}

				.content::before {
					left: -20upx;
				}
			}

			&.right {
				flex-direction: row-reverse;
				text-align: right;

				.face {
					margin-left: 30upx;
				}

				.content {
					background-color: #A0EA6F;

					&::before {
						right: -20upx;
						transform: rotate(180deg);
						border-right: 30upx solid #A0EA6F;
					}

					.voice-icon {
						margin-right: 0;
						margin-left: 180upx;
						transform: rotate(180deg);
					}
				}
			}
		}

		#bottom {
			height: 30rpx;
		}
	}


	.custom_box {
		width: 750rpx;
		position: fixed;
		top: 0;
		left: 0;
		z-index: 8;
		padding-bottom: 10rpx;
		opacity: 1;
	}

	.new_box {
		position: relative;
		width: 100%;
		margin-top: 20rpx;
		z-index: 99;
	}

	.indexbg {
		position: absolute;
		top: 0;
		left: 0;
		width: 750rpx;
		height: 460rpx;
	}

	.indexbg2 {
		position: absolute;
		top: 0;
		left: 0;
		width: 750rpx;
		height: 100%;
	}

	.custom_nav {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 750rpx;
		font-size: 36rpx;
		z-index: 9;
		color: #FFFFFF;
	}

	.custom_addrress {
		font-weight: bold;
		font-size: 36rpx;
		/* #ifdef MP-ALIPAY */
		margin-left: 70rpx;
		/* #endif */
	}

	.goback {
		position: absolute;
		left: 30rpx;
		// text-align: center;
		width: 14rpx;
		height: 30rpx;
		// color: #000;

	}

	/deep/ .u-navbar__content__right__text {
		color: #FFFFFF;
	}

	/deep/.u-navbar__content {
		background: transparent !important;
	}

	/deep/.u-navbar__content__title {
		width: 400rpx;
		font-size: 28rpx !important;
	}



	.status_bar,
	.header,
	.emoji,
	.file {
		background-color: #F3F3F3;

	}

	.indexbg {
		position: absolute;
		top: 0;
		left: 0;
		width: 750rpx;
		height: 460rpx;

	}

	.status_bar {
		// background-color: green;
	}

	.header {
		// background-color: #A0EA6F;
		border-bottom: 2upx solid #EEE;

		.center {
			font-weight: bold;
		}
	}

	.map {
		width: 60%;
		height: 300upx;
		background-color: #FFF !important;

		&::before {
			border-right: 30upx solid #FFF !important;
		}

		.title {
			height: 80upx;
			font-size: 28upx;
			overflow: hidden;
			text-overflow: ellipsis;
			display: -webkit-box;
			-webkit-line-clamp: 2;
			-webkit-box-orient: vertical;
		}

		.box {
			width: 100%;
			height: 170upx;
			margin-top: 10upx;
		}
	}

	.emoji {
		width: 750rpx;
		height: 360upx;
		padding: 0 0 20upx 20upx;
		position: absolute;
		bottom: 0rpx;
		z-index: 21;
		padding-top: 40rpx;
		background-color: #F3F3F3;

		// background-color: yellow;
		.list {
			width: 100%;
			height: 400upx;
			padding: 20upx 0;
			overflow-y: auto;
			padding-bottom: 160rpx;

			.item {
				float: left;
				display: block;
				height: 60upx;
				line-height: 60upx;
				width: calc(100% / 12);
				margin-right: 20upx;
			}
		}
	}

	.file {
		display: flex;
		align-items: center;
		width: 750rpx;
		padding: 30upx 20upx;
		position: absolute;
		z-index: 20;
		bottom: 0rpx;
		padding-bottom: 20rpx;

		// background-color: #000;
		.list {
			display: flex;
			overflow: hidden;
			padding-left: 10upx;
			justify-content: flex-start;

		}

		.item {
			display: flex;
			justify-content: center;
			align-items: center;
			width: 110upx;
			height: 110upx;
			border-radius: 10upx;
			margin-right: 40upx;
			background-color: #FFF;

			.icon {
				width: 110upx;
				height: 110upx;
			}

			.text {
				font-size: 24upx;
				margin-top: 4upx;
			}
		}
	}

	.oper {
		width: 750rpx;
		height: 180upx;
		padding: 0 20upx;
		box-sizing: border-box;
		border-top: 2upx solid #EEE;
		border-bottom: 2upx solid #EEE;
		background-color: #dedede;
		display: flex;
		// align-items: center;
		flex-direction: column;
		justify-content: center;
		padding-bottom: 20rpx;
		/* #ifdef H5 || MP-WEIXIN */
		position: absolute;
		bottom: 0rpx;
		/* #endif */

		z-index: 10;

		.input {
			width: 550rpx;
			height: 68upx;
			line-height: 68upx;
			padding: 0 20upx;
			font-size: 28upx;
			border-radius: 10upx;
			background-color: #fff;
			width: calc(100% - 120upx - 20upx - 40upx - 60upx);
		}

		.icon {
			width: 60upx;
			height: 60upx;
			margin-left: 20rpx;
		}

		.btn {
			color: #fff;
			width: 90upx;
			height: 52upx;
			font-size: 24upx;
			line-height: 52upx;
			text-align: center;
			border-radius: 10upx;
			background: linear-gradient(270deg, #FA2222 2%, #FFC400 98%);
			margin-left: 20rpx;
		}
	}

	.Toolswrap {
		position: absolute;
		top: 30rpx;
		left: 50%;
		transform: translate(-50%);
		width: 530rpx;
		height: 144rpx;
		background: #666666;
		border-radius: 24rpx 24rpx 24rpx 24rpx;
		z-index: 9;
		display: flex;
		// justify-content: space-around;
		align-items: center;
	}

	.Toolsitem {
		width: 140rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;

		>image {
			width: 40rpx;
			height: 40rpx;

		}

		>text {
			font-weight: 400;
			font-size: 26rpx;
			color: #FFFFFF;
			margin-top: 10rpx;
		}
	}

	.orderwrap {
		width: 524rpx;
		min-height: 242rpx;
		background: #FFFFFF;
		border-radius: 12rpx 12rpx 12rpx 12rpx;
		position: relative;

		.order_box {
			width: 100%;
			margin-top: 0;
			padding-bottom: 0;
			padding: 20rpx;

			.order_box_t {
				width: 100%;
				padding: 0rpx 20rpx 12rpx;
			}

			.order_goods {
				width: 484rpx;
				background: #F7F7F7;
				border-radius: 12rpx;

				.ordergoods_box {
					padding: 10rpx;
				}

				.order_title {
					font-size: 44rpx;
				}

				.order_icon {
					width: 100rpx;
					height: 100rpx;
					border-radius: 14rpx;
					margin-right: 20rpx;
				}

				.order_box_order {
					width: 322rpx;

				}

				.orderName {
					width: 322rpx;
					overflow: hidden;
					text-overflow: ellipsis;
					white-space: nowrap;
				}

			}

		}
	}

	.shangpinwrap {
		width: 524rpx;
		height: 242rpx;
		background: #FFFFFF;
		border-radius: 12rpx 12rpx 12rpx 12rpx;
		position: relative;

		>image {
			width: 136rpx;
			height: 136rpx;
			position: absolute;
			left: 20rpx;
			top: 20rpx;
			border-radius: 12rpx 12rpx 12rpx 12rpx;
		}

		.topdianpuwrap {
			width: 300rpx;
			position: absolute;
			left: 176rpx;
			top: 20rpx;

			>text {
				text-align: left;
				display: block;
				width: 330rpx;
				white-space: nowrap;
				/* 防止文本换行 */
				overflow: hidden;
				/* 隐藏溢出的文本 */
				text-overflow: ellipsis;
				font-weight: 400;
				font-size: 30rpx;
				color: #3D3D3D;
			}

		}
	}

	.shangpinwrap1 {
		width: 524rpx;
		// height: 242rpx;
		background: #FFFFFF;
		border-radius: 12rpx 12rpx 12rpx 12rpx;
		position: relative;
		padding: 20rpx;

		.shangpinbox {
			width: 100%;
			padding: 20rpx;
			background: #F7F7F7;
			margin-bottom: 15rpx;

			>image {
				width: 100rpx;
				height: 100rpx;
				border-radius: 14rpx;
				margin-right: 20rpx;
			}
		}

		.topdianpuwrap {
			width: 330rpx;
			text-align: left;

			.shangpinName {
				width: 330rpx;
				white-space: nowrap;
				/* 防止文本换行 */
				overflow: hidden;
				/* 隐藏溢出的文本 */
				text-overflow: ellipsis;
				font-weight: 400;
				font-size: 30rpx;
				color: #3D3D3D;
			}

		}
	}

	.price {
		font-weight: 500;
		font-size: 32rpx;
		color: #E78C4C;
		margin-top: 10rpx;
		text-align: left;
	}

	.dwbtn1 {
		width: 128rpx;
		height: 48rpx;
		background: linear-gradient(270deg, #FA2222 2%, #FFC400 98%);
		border-radius: 152rpx;
		text-align: center;
		line-height: 48rpx;
		font-weight: 400;
		font-size: 24rpx;
		color: #ffffff;
		text-align: center;
	}

	.dwbtn {
		width: 128rpx;
		height: 48rpx;
		background: linear-gradient(270deg, #FA2222 2%, #FFC400 98%);
		border-radius: 152rpx;
		text-align: center;
		line-height: 48rpx;
		font-weight: 400;
		font-size: 24rpx;
		color: #ffffff;
		text-align: center;
		position: absolute;
		right: 20rpx;
		bottom: 24rpx;
	}

	.dianpuwrap {
		width: 524rpx;
		height: 176rpx;
		background: #FFFFFF;
		border-radius: 12rpx 12rpx 12rpx 12rpx;
		margin-top: 15rpx;
		position: relative;

		>image {
			width: 136rpx;
			height: 136rpx;
			position: absolute;
			left: 20rpx;
			top: 20rpx;
			border-radius: 12rpx 12rpx 12rpx 12rpx;
		}

		.topdianpuwrap {
			width: 300rpx;
			position: absolute;
			left: 176rpx;
			top: 20rpx;

			>text {
				text-align: left;
				display: block;
				width: 330rpx;
				white-space: nowrap;
				/* 防止文本换行 */
				overflow: hidden;
				/* 隐藏溢出的文本 */
				text-overflow: ellipsis;
				font-weight: 400;
				font-size: 30rpx;
				color: #3D3D3D;
			}

			.btnsss {
				width: 128rpx;
				height: 48rpx;
				background: #FFC300;
				border-radius: 54rpx 54rpx 54rpx 54rpx;
				text-align: center;
				line-height: 48rpx;
				font-weight: 400;
				font-size: 24rpx;
				color: #3D3D3D;
				margin-left: 200rpx;
			}
		}

	}

	/* #ifdef H5 */
	.wraps {
		display: flex;
		width: 400rpx;
		align-items: self-end;
		flex-direction: column;

		.content {
			color: #000;
			font-size: 32upx;
			min-height: 80upx;
			border-radius: 10upx;
			padding: 20upx 24upx;
			background-color: #fff;
			word-break: break-all;
			word-wrap: break-word;
			max-width: calc(100% - 100upx - 120upx);
			position: relative;


		}

		>video {
			position: relative;
			z-index: 2;
		}
	}

	.yesss {
		align-items: self-end;
	}

	.nosss {
		align-items: start
	}

	/* #endif */
	/* #ifdef MP-WEIXIN */
	.wraps {
		display: flex;
		width: 400rpx;
		// align-items: self-end;
		// flex-direction: column;

		.content {

			color: #000;
			font-size: 32upx;
			min-height: 80upx;
			border-radius: 10upx;
			padding: 20upx 24upx;
			background-color: #fff;
			word-break: break-all;
			word-wrap: break-word;
			max-width: calc(100% - 100upx - 120upx);
			position: relative;


		}

		>video {
			position: relative;
			z-index: 2;
		}
	}

	.yesss {
		display: flex;
		justify-content: flex-end;
		align-items: self-end !important;
	}

	.nosss {
		align-items: self-start;
		flex-direction: column;
		// align-items: start !important;
	}

	/* #endif */

	.yesmar {
		margin-top: 40rpx;
	}

	.nomar {
		margin-top: 0rpx !important;
	}

	.nickname {
		width: 300rpx;
		white-space: nowrap;
		/* 防止文本换行 */
		overflow: hidden;
		/* 隐藏溢出的文本 */
		text-overflow: ellipsis;
		/* 当文本溢出时显示省略号 */
		font-weight: 400;
		font-size: 26rpx;
		color: #000;
		opacity: 0.6;
	}

	.titemo {
		display: flex;
		align-items: center;

		>image {
			// margin-left: 30rpx;
			margin-right: 40rpx;
			width: 40rpx;
			height: 40rpx;
		}
	}

	.list2 {
		width: 750rpx;
		height: 400rpx;
		overflow-y: auto;
		display: flex;
		flex-wrap: wrap;
		padding-bottom: 140rpx;

		.itemii {
			width: 100rpx;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;

			// height: 130rpx;
			>image {
				width: 100rpx;
				height: 100rpx;
			}

			>text {
				width: 100rpx;
				font-size: 26rpx;
				color: #A6A5AF;
				text-align: center;
			}
		}

	}

	.yinyongwrap {
		// position: absolute;
		// top: 100rpx;
		// left: 40rpx;
		margin-top: 10rpx;
		margin-left: 20rpx;
		position: relative;
		font-size: 24rpx;
		width: 530rpx;
		background-color: #F3F3F3;
		border-radius: 10rpx;
		padding: 6rpx;
		color: #666;

		.cont {
			display: block;
			width: 470rpx;
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
		}
	}

	.warpssss {
		width: 100vw;
		height: 100vh;
		background: #fff;
		display: flex;
		justify-content: center;
		align-items: center;
		color: #000;
		font-size: 36rpx;
		padding: 60rpx;
	}

	.bbwrap {
		background-color: rgb(232, 232, 232);
		color: rgb(121, 121, 121);
		padding: 10rpx;
		margin-top: 10rpx;
		border-radius: 10rpx;
		font-size: 24rpx;
		display: flex;
		align-items: center;
		position: relative;

	}

	.order_list {
		position: relative;
		width: 750rpx;
		background: #F7F7F7;
		border-radius: 50rpx 50rpx 0rpx 0rpx;
		padding-bottom: 30rpx;
	}

	.order_top {
		width: 750rpx;
		height: 84rpx;
		font-size: 30rpx;
		background: #ffffff;
		border-radius: 50rpx 50rpx 0rpx 0rpx;
	}

	.scroll-box {
		height: 860rpx;
	}

	.order_box {
		width: 702rpx;
		background: #FFFFFF;
		border-radius: 24rpx 24rpx 24rpx 24rpx;
		margin-top: 24rpx;
		padding-bottom: 24rpx;
		margin: 24rpx auto 0;
	}

	.order_box_t {
		width: 100%;
		padding: 24rpx 24rpx 16rpx 24rpx;
	}

	.order_goods_r {
		display: inline-block;
		width: 500rpx;
		// background: pink;
		margin-left: 16rpx;
	}

	.order_icon {
		width: 140rpx;
		height: 140rpx;
		border-radius: 14rpx;
	}

	.specifications {
		position: relative;
	}

	.moneys {
		margin: 0 16rpx 0 4rpx;
	}

	.send_order {
		position: absolute;
		top: 20;
		right: 0;
		width: 124rpx;
		height: 56rpx;
		line-height: 56rpx;
		background: linear-gradient(270deg, #FA2222 2%, #FFC400 98%);
		border-radius: 50rpx;
		font-size: 30rpx;
		color: #ffffff;
		text-align: center;
	}

	.prompt {
		width: 600rpx;
		background: #ffffff;
		margin: 0 auto;
		border-radius: 20rpx;
		padding-top: 10rpx;
		padding-bottom: 40rpx;
	}

	.prompt>text {
		margin-top: 40rpx;
	}

	.prompt_tit {
		margin: 0 30rpx;
		font-size: 28rpx;
		color: #666666;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		overflow: hidden;
	}

	.prompt_ntm {
		width: 100%;
		font-size: 30rpx;
		margin-top: 50rpx;
	}

	.prompt_ntm>text:nth-child(1) {
		width: 200rpx;
		height: 72rpx;
		line-height: 72rpx;
		text-align: center;
		background: #F2F2F2;
		border: 1rpx solid #F2F2F2;
		border-radius: 40rpx;
		color: #333333;
	}

	.prompt_ntm>text:nth-child(2) {
		width: 200rpx;
		height: 72rpx;
		line-height: 72rpx;
		text-align: center;
		background: linear-gradient(90deg, #FA2222 2%, #FFC400 98%);
		border-radius: 40rpx;
		color: #ffffff;
	}
</style>